#!/bin/bash

# Auth:	gong_libin
# Date:	2016_01_01

GO="go"
RUN="run"
FMT="fmt"
BUILD="build"

GO_ENV=`pwd`
GO_BIN=$GO_ENV/bin
GO_PKG=$GO_ENV/pkg
GO_SRC=$GO_ENV/src
GO_TST=$GO_ENV/test

GO_CAP=$GO_SRC/GoCap
GO_CLS=$GO_SRC/GoCls
GO_GLB=$GO_SRC/GoGlb
GO_NET=$GO_SRC/GoNet
GO_SQL=$GO_SRC/GoSql
GO_PRO=$GO_SRC/GoPro

export GO
export RUN
export FMT
export BUILD

export GO_ENV
export GO_BIN
export GO_PKG
export GO_SRC
export GO_TST

export GO_CAP
export GO_CLS
export GO_GLB
export GO_NET
export GO_SQL
export GO_PRO

export GOPATH=`pwd`
export GOBIN=$GOPATH/bin/

# $GO_SRC/GoCap
GO_MAP=$GO_CAP/GoMap.go
GO_SET=$GO_CAP/GoSet.go
GO_VEC=$GO_CAP/GoVec.go
GO_CHAN=$GO_CAP/GoChan.go
GO_HASH=$GO_CAP/GoHash.go
GO_LIST=$GO_CAP/GoList.go

echo "$GO $BUILD $GO_CAP"

echo "$GO $BUILD $GO_MAP"
	$GO $BUILD $GO_MAP

echo "$GO $BUILD $GO_SET"
	$GO $BUILD $GO_SET

echo "$GO $BUILD $GO_VEC"
	$GO $BUILD $GO_VEC

echo "$GO $BUILD $GO_CHAN"
	$GO $BUILD $GO_CHAN

echo "$GO $BUILD $GO_HASH"
	$GO $BUILD $GO_HASH

echo "$GO $BUILD $GO_LIST"
	$GO $BUILD $GO_LIST

# $GO_SRC/GoCls
GO_IDX=$GO_CLS/GoIdx.go
GO_CODE=$GO_CLS/GoCode.go
GO_CONF=$GO_CLS/GoConf.go
GO_FILE=$GO_CLS/GoFile.go
GO_LOCK=$GO_CLS/GoLock.go
GO_TIME=$GO_CLS/GoTime.go
GO_BLOOM=$GO_CLS/GoBloom.go

echo "$GO $BUILD $GO_CLS"

echo "$GO $BUILD $GO_IDX"
	$GO $BUILD $GO_IDX

echo "$GO $BUILD $GO_CODE"
	$GO $BUILD $GO_CODE

echo "$GO $BUILD $GO_CONF"
	$GO $BUILD $GO_CONF

echo "$GO $BUILD $GO_FILE"
	$GO $BUILD $GO_FILE

echo "$GO $BUILD $GO_LOCK"
	$GO $BUILD $GO_LOCK

echo "$GO $BUILD $GO_TIME"
	$GO $BUILD $GO_TIME

echo "$GO $BUILD $GO_BLOOM"
	$GO $BUILD $GO_BLOOM

# $GO_SRC/GoGlb
GO_DEF=$GO_GLB/GoDef.go
GO_OUT=$GO_GLB/GoOut.go

echo "$GO $BUILD $GO_GLB"

echo "$GO $BUILD $GO_DEF"
	$GO $BUILD $GO_DEF

echo "$GO $BUILD $GO_OUT"
	$GO $BUILD $GO_OUT

# $GO_SRC/GoNet
GO_TCP=$GO_NET/GoTcp.go
GO_UDP=$GO_NET/GoUdp.go

echo "$GO $BUILD $GO_NET"

echo "$GO $BUILD $GO_TCP"
	$GO $BUILD $GO_TCP

echo "$GO $BUILD $GO_UDP"
	$GO $BUILD $GO_UDP

# $GO_SRC/GoSql
GO_MYSQL=$GO_SQL/GoMysql.go
GO_REDIS=$GO_SQL/GoRedis.go

echo "$GO $BUILD $GO_SQL"

echo "$GO $BUILD $GO_MYSQL"
	$GO $BUILD $GO_MYSQL

echo "$GO $BUILD $GO_REDIS"
#	$GO $BUILD $GO_REDIS

# $GO_SRC/GoPro
GO_PB=$GO_PRO/GoPb.go
GO_PRI=$GO_PRO/GoPri.go

echo "$GO $BUILD $GO_PRO"

echo "$GO $BUILD $GO_PB"
	$GO $BUILD $GO_PB

echo "$GO $BUILD $GO_PRI"
	$GO $BUILD $GO_PRI

echo "protoc --go_out=./ XXX.proto"
#	protoc --go_out=./ GoPb.proto

# $GO_ENV/test
GO_TPB=$GO_TST/GoPbTest.go
GO_TMAP=$GO_TST/GoMapTest.go
GO_TSET=$GO_TST/GoSetTest.go
GO_TVEC=$GO_TST/GoVecTest.go
GO_TIDX=$GO_TST/GoIdxTest.go
GO_TMLT=$GO_TST/GoMltTest.go
GO_TPRI=$GO_TST/GoPriTest.go
GO_TTCP=$GO_TST/GoTcpTest.go
GO_TUDP=$GO_TST/GoUdpTest.go
GO_TTIME=$GO_TST/GoTimeTest.go
GO_TCHAN=$GO_TST/GoChanTest.go
GO_TCONF=$GO_TST/GoConfTest.go
GO_THASH=$GO_TST/GoHashTest.go
GO_TLIST=$GO_TST/GoListTest.go
GO_TCODE=$GO_TST/GoCodeTest.go
GO_TFILE=$GO_TST/GoFileTest.go
GO_TLOCK=$GO_TST/GoLockTest.go
GO_TMYSQL=$GO_TST/GoMysqlTest.go
GO_TREDIS=$GO_TST/GoRedisTest.go
GO_TBLOOM=$GO_TST/GoBloomTest.go

echo "$GO $BUILD $GO_TST"

echo "$GO $RUN $GO_TPB"
	$GO $RUN $GO_TPB

echo "$GO $RUN $GO_TMAP"
	$GO $RUN $GO_TMAP

echo "$GO $RUN $GO_TSET"
	$GO $RUN $GO_TSET

echo "$GO $RUN $GO_TVEC"
	$GO $RUN $GO_TVEC

echo "$GO $RUN $GO_TIDX"
	$GO $RUN $GO_TIDX

echo "$GO $RUN $GO_TMLT"
#	$GO $RUN $GO_TMLT

echo "$GO $RUN $GO_TPRI"
	$GO $RUN $GO_TPRI

echo "$GO $RUN $GO_TTCP"
#	$GO $RUN $GO_TTCP

echo "$GO $RUN $GO_TUDP"
#	$GO $RUN $GO_TUDP

echo "$GO $RUN $GO_TTIME"
	$GO $RUN $GO_TTIME

echo "$GO $RUN $GO_TCHAN"
	$GO $RUN $GO_TCHAN

echo "$GO $RUN $GO_TCONF"
	$GO $RUN $GO_TCONF

echo "$GO $RUN $GO_THASH"
	$GO $RUN $GO_THASH

echo "$GO $RUN $GO_TLIST"
	$GO $RUN $GO_TLIST

echo "$GO $RUN $GO_TCODE"
	$GO $RUN $GO_TCODE

echo "$GO $RUN $GO_TFILE"
	$GO $RUN $GO_TFILE

echo "$GO $RUN $GO_TLOCK"
	$GO $RUN $GO_TLOCK

echo "$GO $RUN $GO_TMYSQL"
#	$GO $RUN $GO_TMYSQL

echo "$GO $RUN $GO_TREDIS"
#	$GO $RUN $GO_TREDIS

echo "$GO $RUN $GO_TBLOOM"
	$GO $RUN $GO_TBLOOM
